From: George Dunlap Date: Thu, 25 Feb 2016 14:49:00 +0000 (+0000) Subject: tools/xenalyze: Fix check for error return value X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1633 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=1065622448c1cc5a10425914f02708750046b17e;p=xen.git tools/xenalyze: Fix check for error return value fdopen returns NULL on failure, not a negative integer. CID 1306863 CID 1306858 Signed-off-by: George Dunlap Acked-by: Ian Jackson --- diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 33f812919b..d071f9d23c 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -9028,7 +9028,7 @@ void progress_init(void) { opt.progress = 0; } - if( (G.progress.out = fdopen(G.progress.pipe[1], "w")) < 0 ) { + if( (G.progress.out = fdopen(G.progress.pipe[1], "w")) == NULL ) { fprintf(stderr, "%s: could not fdopen pipe: %s, disabling progress bar\n", __func__, strerror(errno)); opt.progress = 0;